<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<style>
    div {
        /*background: #ff0099;*/
        /*height: 20px;*/
    }

    /*div:before {*/
    /*position: absolute;*/
    /*display:block;*/
    /*top: 2px;*/
    /*left: 0px;*/
    /*content: " ";*/
    /*height: 18px;*/
    /*background-color: #00ff00;*/
    /*width: 4px;*/
    /*height: 4px;*/
    /*}*/

    div {
        float: left;
        margin-right: 8px;
        background: #b4b472;
    }
</style>

<div class="aa">ABC</div>
<div class="aa">DEF</div>

<script src="jquery-1.8.3.min.js"></script>
<script>
    setTimeout(function () {
        var divs = document.getElementsByTagName("div");
        var d0 = divs.item(0);
        console.log(d0);
        d0.textContent = "abcd";
        var aas = document.getElementsByClassName('aa');
        d0 = divs.item(1);
        console.log(d0);
        d0.textContent = "abcde";
    }, 2000);
</script>

</body>
</html>